package com.zer0.tga;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.Properties;

public class GameProperties {

	private Properties props = new Properties();
	
	private static GameProperties gp = null; // singleton
	
	public static GameProperties getInstance()
	{
		if (gp==null)
			gp = new GameProperties();
		
		return gp;
	}
	
	private GameProperties()
	{
		// load from file
		String filestr = "res/rooms2.txt";
		BufferedReader reader = null;
		try {

			if(Game.class.getResource("Game.class").toString().startsWith("jar"))
			{
				reader = new BufferedReader(new InputStreamReader(Game.class.getClass().getResourceAsStream("/" + filestr)));
			}
			else
			{
				File roomFile = new File(filestr);
				reader = new BufferedReader(new FileReader(roomFile));
			}
		String line = null;	
	    while ((line=reader.readLine()) != null) 
	    {
	    	
	    }
		}catch(Exception e)
		{
			
		}
	}
}
